<?php namespace Home\Controller; 
use Hdphp\Controller\Controller;
//内容控制器
class ContentController extends Controller{
	public function index(){
		$tagModel = new \Common\Model\Tag;
		$arcTagModel=new \Common\Model\ArcTag;
//		p(Q("get."));
		$aid = Q('get.aid');
		//获取文章数据
		$arcModel = new \Common\Model\Arc;
		$arcData = $arcModel->join('article_data','article_aid','=','aid')->where("aid={$aid}")->find();
//		p($arcData);
//		便签
		$arcData['tag']=$arcTagModel
						->join('tag','tag_tid','=','tid')
						->where("article_aid={$aid}")
						->get();
		
//		p($arcData);
		View::with('arcData',$arcData);
	    View::make();
	}
	
}